import Layout from '@/page/index/'

export default [{
  path: '/login',
  name: '登录页',
  component: () =>
    import(/* webpackChunkName: "page" */ '@/page/login/index'),
  meta: {
    keepAlive: true,
    isTab: false,
    isAuth: false
  }
},
{
  path: '/lock',
  name: '锁屏页',
  component: () =>
    import(/* webpackChunkName: "page" */ '@/page/lock/index'),
  meta: {
    keepAlive: true,
    isTab: false,
    isAuth: false
  }
},
{
  path: '/',
  name: '主页',
  redirect: '/AccessManagement'
},
{
  path: '/wel',
  component: Layout,
  redirect: '/wel/index',
  children: [{
    path: 'index',
    name: '首页',
    meta: {
      i18n: 'dashboard'
    },
    component: () =>
      import(/* webpackChunkName: "views" */ '@/views/test')
  }
  ]
},
{
  path: '/AccessManagement',
  component: Layout,
  redirect: '/AccessManagement/Applications',
  children: [{
    path: 'Applications',
    name: '应用及模块接入',
    meta: {
      from: ['接入应用及模块编辑'],
      pageName: 'Applications',
      isSideBar: true,
      originAlive: true
    },
    component: () =>
      import(/* webpackChunkName: "views" */ '@/views/AccessManagement/Applications')
  },
  {
    path: 'ToDoTask',
    name: '任务中心接入',
    meta: {
      from: ['任务中心保存'],
      isSideBar: true,
      pageName: 'ToDoTask',
      originAlive: true
    },
    component: () =>
      import(/* webpackChunkName: "views" */ '@/views/AccessManagement/ToDoTask')
  },
  {
    path: 'ToDoTaskSave',
    name: '任务中心保存',
    component: () => import(/* webpackChunkName: "views" */ '@/views/AccessManagement/ToDoTaskSave')
  },
  {
    path: 'EditAppAndModule',
    name: '接入应用及模块编辑',
    component: () =>
      import(/* webpackChunkName: "views" */ '@/views/AccessManagement/EditAppAndModule')
  }
  ]
},

{
  path: '/myiframe',
  component: Layout,
  redirect: '/myiframe',
  children: [{
    path: ':routerPath',
    name: 'iframe',
    component: () =>
      import(/* webpackChunkName: "page" */ '@/components/iframe/main'),
    props: true
  }]
},
{
  path: '/back',
  name: '回调页',
  component: () =>
    import(/* webpackChunkName: "back" */ '@/page/back/index'),
  meta: {
    keepAlive: false,
    isTab: false,
    isAuth: false
  }
},
{
  path: '/tokenConfig',
  name: '中转页',
  component: () =>
    import(/* webpackChunkName: "tokenConfig" */ '@/page/tokenConfig/index'),
  meta: {
    keepAlive: false,
    isTab: false,
    isAuth: false
  }
},
{
  path: '/404',
  component: () =>
    import(/* webpackChunkName: "page" */ '@/components/errorPage/404'),
  name: '404',
  meta: {
    keepAlive: true,
    isTab: false,
    isAuth: false
  }

},
{
  path: '/403',
  component: () =>
    import(/* webpackChunkName: "page" */ '@/components/errorPage/403'),
  name: '403',
  meta: {
    keepAlive: true,
    isTab: false,
    isAuth: false
  }
},
{
  path: '/500',
  component: () =>
    import(/* webpackChunkName: "page" */ '@/components/errorPage/500'),
  name: '500',
  meta: {
    keepAlive: true,
    isTab: false,
    isAuth: false
  }
},
{
  path: '*',
  redirect: '/404'
}
]
